import { Etheme } from "./common";

interface IModelParams {
  title: string;
  theme: Etheme;
  color: string;
}

export enum ExitType {
  Close = "close",
  Mini = "mini",
}
interface IThemeColors {
  label: string;
  color: string;
  name: Etheme;
}
interface ISecurityQuestion {
  label: string;
  question: string;
  answer: any;
}
interface ILockScreenData {
  password: string;
  securityQuestionList: ISecurityQuestion[];
}

interface IWeatherData {
  cloud: string; // 云量百分比，例："100"
  dew: string; // 露点温度，例："13"
  feelsLike: string; // 体感温度，例："19"
  humidity: string; // 湿度百分比，例："61"
  icon: string; // 天气图标编号，例："101"
  obsTime: string; // 观测时间，ISO8601 格式，例："2025-05-24T12:21+09:00"
  precip: string; // 降水量，例："0.0"
  pressure: string; // 气压，例："1014"
  temp: string; // 实际温度，例："20"
  text: string; // 天气描述，例："曇り"
  vis: string; // 能见度，单位公里，例："10"
  wind360: string; // 风向角度，例："0"
  windDir: string; // 风向，例："N"
  windScale: string; // 风力等级，例："2"
  windSpeed: string; // 风速，单位 km/h，例："11"
}

interface ICurrentWeather extends IWeatherData {
  location: string;
}

interface IWeatherSevenDayForecast {
  fxDate: string; // 预报日期，例："2025-05-26"
  sunrise: string; // 日出时间，例："04:52"
  sunset: string; // 日落时间，例："19:33"
  moonrise: string; // 月升时间，例："03:42"
  moonset: string; // 月落时间，例："19:03"
  moonPhase: string; // 月相名称，例："残月"
  moonPhaseIcon: string; // 月相图标编号，例："807"
  tempMax: string; // 最高温度，例："29"
  tempMin: string; // 最低温度，例："17"
  iconDay: string; // 白天天气图标编号，例："101"
  textDay: string; // 白天天气描述，例："多云"
  iconNight: string; // 夜间天气图标编号，例："151"
  textNight: string; // 夜间天气描述，例："多云"
  wind360Day: string; // 白天风向角度，例："225"
  windDirDay: string; // 白天风向，例："西南风"
  windScaleDay: string; // 白天风力等级，例："1-3"
  windSpeedDay: string; // 白天风速，例："3"
  wind360Night: string; // 夜间风向角度，例："225"
  windDirNight: string; // 夜间风向，例："西南风"
  windScaleNight: string; // 夜间风力等级，例："1-3"
  windSpeedNight: string; // 夜间风速，例："3"
  humidity: string; // 湿度百分比，例："50"
  precip: string; // 降水量，例："0.0"
  pressure: string; // 气压，例："1008"
  vis: string; // 能见度，例："25"
  cloud: string; // 云量百分比，例："1"
  uvIndex: string; // 紫外线指数，例："10"
}

interface IWeatherDayHourForecast {
  fxTime: string; // 预报时间，例："2025-05-26T18:00+08:00"
  temp: string; // 温度，例："27"
  icon: string; // 天气图标编号，例："101"
  text: string; // 天气描述，例："多云"
  wind360: string; // 风向角度，例："289"
  windDir: string; // 风向，例："西风"
  windScale: string; // 风力等级，例："1-3"
  windSpeed: string; // 风速，例："14"
  humidity: string; // 湿度百分比，例："29"
  pop: string; // 降水概率，例："0"
  precip: string; // 降水量，例："0.0"
  pressure: string; // 气压，例："1008"
  cloud: string; // 云量百分比，例："85"
  dew: string; // 露点温度，例："8"
}

interface ILocationData {
  lat: number;
  lon: number;
  city: string;
  query: string;
  as: string;
  isp: string;
  timezone: string;
  region: string;
  country: string;
}

export type {
  IModelParams,
  IThemeColors,
  ISecurityQuestion,
  ILockScreenData,
  IWeatherData,
  ILocationData,
  ICurrentWeather,
  IWeatherSevenDayForecast,
  IWeatherDayHourForecast,
};
